package com.yc.backstage.service.serviceImpl;

import com.yc.backstage.entity.SysPost;
import com.yc.backstage.mapper.SysPostMapper;
import com.yc.backstage.service.SysPostService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @Classname SysPostController
* @Description
* @Version 1.0.0
* @Date 2022-08-23 11:49:19
* @Created by Mikechen
*/
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements SysPostService {
    @Autowired
    private SysPostMapper sysPostMapper;

    /**
     * 查询所有岗位
     * @return
     */
    @Override
    public List<SysPost> selectPostAll() {
        return sysPostMapper.selectPsotAll();
    }

    /**
     * 根据用户id查询用户的岗位信息
     * @param userId
     * @return
     */
    @Override
    public List<Long> selectPostIdsByUserId(Long userId) {
        return sysPostMapper.selectPsotByUserId(userId);
    }
}
